package hg.framework.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 锁定状态
 * @author guoqifei
 * @date 2021-01-12
 */
@AllArgsConstructor
@Getter
public enum LockStateEnum
{
    UN_LOCK("0", "未锁定,正常使用"),
    LOCK_ED("1", "已锁定,无法使用"),
    ;
    private String dbVal;
    private String text;

    /**
     * 是否已锁定
     * @param dbVal
     * @return
     */
    public static boolean isLocked(String dbVal) {
        return LockStateEnum.LOCK_ED.getDbVal().equals(dbVal);
    }
}
